<template>
    <div class="ring-form-container">

        <div class="ring-form-box">
            <i class="ring-form-ring" style="--clr:#00ff0a;"></i>
            <i class="ring-form-ring" style="--clr:#ff0057;"></i>
            <i class="ring-form-ring" style="--clr:#fffd44;"></i>
            <div class="ring-form-content">
                <h2 class="ring-form-title">登陆</h2>
                <div class="ring-form-item">
                    <input class="ring-form-input" type="text" placeholder="请输入用户名">
                </div>
                <div class="ring-form-item">
                    <input class="ring-form-input" type="password" placeholder="请输入密码">
                </div>
                <div class="ring-form-item">
                    <input class="ring-form-submit" type="submit" value="登陆">
                </div>
            </div>
        </div>
    </div>
</template>

<script>

export default {
    name: "RingRotateForm",
    data() {
        return {
        }
    },

}
</script>

<style scoped>
.ring-form-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.ring-form-box {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ring-form-ring {
    position: absolute;
    inset: 0;
    border: 2px solid #fff;
    transition: 0.5s;
}

.ring-form-ring:nth-child(1) {
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
    animation: animate 6s linear infinite;
}

.ring-form-ring:nth-child(2) {
    border-radius: 41% 44% 56% 59%/38% 62% 63% 37%;
    animation: animate 4s linear infinite;

}

.ring-form-ring:nth-child(3) {
    border-radius: 41% 44% 56% 59%/38% 62% 63% 37%;
    animation: animate2 10s linear infinite;

}

.ring-form-box:hover .ring-form-ring {
    border: 6px solid var(--clr);
    filter: drop-shadow(0 0 20px var(--clr));

}

@keyframes animate {

    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes animate2 {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }

}

.ring-form-content {
    position: absolute;
    width: 300px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.ring-form-title {
    font-size: 2em;
    color: #fff;
}

.ring-form-item {
    position: relative;
    width: 100%;
    height: 50px;
}

.ring-form-input {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 40px;
    font-size: 1.2em;
    color: #fff;
    box-shadow: none;
}

.ring-form-input::placeholder{
    color: rgba(255, 255, 255, 0.75);
}

.ring-form-submit {
    position: relative;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(45deg, #ff357a, #fff172);
    border-radius: 40px;
    font-size: 1.2em;
    border: none;
    cursor: pointer;
}

</style>
